<template>
  <view>
    <view class="">
      <my-navbar :widthdata="titlewid">
        <template #icons>
          <uni-icons @click="back" color="white" type="left" size="20"> </uni-icons>
        </template>

        <template #title>
          <span id="myView" ref="myView" style="color: white;">提交订单</span>
        </template>
      </my-navbar>
    </view>

    <!-- 选择收货地址-->

    <my-selectaddress></my-selectaddress>


    <!-- 购物车中的菜品列表-->
    <my-getshopcart></my-getshopcart>


  </view>
</template>

<script>
  export default {
    data() {
      return {
        wh: 0,

        titlewid: 0,
      };
    },
    created() {
      //获取菜单按钮（右上角胶囊按钮）的布局位置信息。坐标信息以屏幕左上角为原点
      let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
      const systemInfo = uni.getWindowInfo()
      const ss = uni.getDeviceInfo()


      this.top1 = systemInfo.statusBarHeight + (ss.system.indexOf('iOS') > -1 ? 44 : 48)
    },
    mounted() {
      let info = uni.createSelectorQuery().in(this).select('#myView');
      info.boundingClientRect(data => {
        //  console.log(data, "data")
        this.titlewid = data.width
      }).exec()
    },
    methods: {
      back() {
        uni.navigateBack()
      }
    }


  }
</script>

<style lang="scss" scoped>

</style>